#ifndef XGE_XFILE_H_
#define XGE_XFILE_H_
#include "xge_common_config.h"
#include "xstring.h"
#include "xsmart_ptr.h"
#include "xallocator.h"
namespace xge{
  // XFile interface for accessing the file in a specific file system
  class File : public Allocator {
  public:
    enum {
      POS_CUR ,
      POS_BEG ,
      POS_END    
    };
    // Seek a position in the file
    virtual int64_t Seek ( int64_t offset , int position ) = 0;
    // Get the internal content of this file 
    virtual size_t Load ( void* chunk , size_t size  ) = 0;
    // Get the internal length of this file
    virtual int64_t Length() = 0;
    // Virtual dtor
    virtual ~File() {}
  };
  // XFilePtr for using specific file pointer 
  typedef xge_internal::SharedPtr< File , xge_internal::DefaultDestructor<File> > FilePtr;

}// namespace xge
#endif// XGE_XFILE_H_